var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    types:"",
    id:"",
  },
  // 看诊
  bindkanzhen(e){
    var that = this;
    var kanzhentime = that.data.time;
    var start = e.currentTarget.dataset.start;
    var end = e.currentTarget.dataset.end;
    var week = that.data.week;
    wx.navigateTo({
      url: '/hyb_yl/zhuanjiasubpages/pages/orders/orders?zid=' + that.data.zid + "&server=" + that.data.server + "&money=" + that.data.money + "&hid=" + that.data.hid + '&time='+kanzhentime + '&start='+start+'&end='+end+'&week='+week,
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    that.setData({
     
      server:options.server,
      money:options.money,
      hid:options.hid,
      zid:options.zid,
      week:options.week,
      time:options.time,
      bgc:wx.getStorageSync('color')
    })
    if(options.server == 'yuanchengguahao')
    {
      that.setData({
        title:"远程挂号"
      })
    }else{
      that.setData({
        title:"预约就诊"
      })
    }
    that.getzhuanjia();
  },
  getzhuanjia:function(){
    var that = this;
    app.util.request({
      'url': 'entry/wxapp/zhuanjia.get_num',
      data:{
        zid:that.data.zid,
        week:that.data.week,
        time:that.data.time
      },
      success: function (res) {
        that.setData({
          info:res.data
        })
      }
    })
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})